function total = importnew2012table(filename, dataLines)
%IMPORTFILE Import data from a text file
%  TOTAL = IMPORTFILE(FILENAME) reads data from text file FILENAME for
%  the default selection.  Returns the data as a table.
%
%  TOTAL = IMPORTFILE(FILE, DATALINES) reads data for the specified row
%  interval(s) of text file FILENAME. Specify DATALINES as a positive
%  scalar integer or a N-by-2 array of positive scalar integers for
%  dis-contiguous row intervals.
%
%  Example:
%  total = importfile("C:\Users\crozi\OneDrive - University Of Oregon\Documents\Crack_waves\TQnew2_20120101T000000_20181230T000000\TQ_table\total.csv", [2, Inf]);
%
%  See also READTABLE.
%
% Auto-generated by MATLAB on 05-Apr-2020 17:46:23

%% Input handling

% If dataLines is not specified, define defaults
if nargin < 2
    dataLines = [2, Inf];
end

%% Setup the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 137);

% Specify range and delimiter
opts.DataLines = dataLines;
opts.Delimiter = ",";

% Specify column names and types
opts.VariableNames = ["T", "stdamp", "meanamp", "medamp", "minamp", "maxamp", "rangeamp", "prom", "Tind", "startind", "start", "Acwt", "Q", "g", "Afit", "cfit", "rsquare", "dfe", "adjrsquare", "rmse", "goodness", "windowstartTime", "channelCount", "amp_HV_NPT_HHE", "amp_HV_NPT_HHN", "amp_HV_NPT_HHZ", "amp_HV_OBL_HHE", "amp_HV_OBL_HHN", "amp_HV_OBL_HHZ", "amp_HV_WRM_HHE", "amp_HV_WRM_HHN", "amp_HV_WRM_HHZ", "amp_HV_SDH_HHE", "amp_HV_SDH_HHN", "amp_HV_SDH_HHZ", "amp_HV_UWE_HHE", "amp_HV_UWE_HHN", "amp_HV_UWE_HHZ", "amp_HV_UWB_HHE", "amp_HV_UWB_HHN", "amp_HV_UWB_HHZ", "amp_HV_SBL_HHE", "amp_HV_SBL_HHN", "amp_HV_SBL_HHZ", "amp_HV_KKO_HHE", "amp_HV_KKO_HHN", "amp_HV_KKO_HHZ", "amp_HV_RIMD_HHE", "amp_HV_RIMD_HHN", "amp_HV_RIMD_HHZ", "phase_HV_NPT_HHE", "phase_HV_NPT_HHN", "phase_HV_NPT_HHZ", "phase_HV_OBL_HHE", "phase_HV_OBL_HHN", "phase_HV_OBL_HHZ", "phase_HV_WRM_HHE", "phase_HV_WRM_HHN", "phase_HV_WRM_HHZ", "phase_HV_SDH_HHE", "phase_HV_SDH_HHN", "phase_HV_SDH_HHZ", "phase_HV_UWE_HHE", "phase_HV_UWE_HHN", "phase_HV_UWE_HHZ", "phase_HV_UWB_HHE", "phase_HV_UWB_HHN", "phase_HV_UWB_HHZ", "phase_HV_SBL_HHE", "phase_HV_SBL_HHN", "phase_HV_SBL_HHZ", "phase_HV_KKO_HHE", "phase_HV_KKO_HHN", "phase_HV_KKO_HHZ", "phase_HV_RIMD_HHE", "phase_HV_RIMD_HHN", "phase_HV_RIMD_HHZ", "errphase_HV_NPT_HHE", "errphase_HV_NPT_HHN", "errphase_HV_NPT_HHZ", "errphase_HV_OBL_HHE", "errphase_HV_OBL_HHN", "errphase_HV_OBL_HHZ", "errphase_HV_WRM_HHE", "errphase_HV_WRM_HHN", "errphase_HV_WRM_HHZ", "errphase_HV_SDH_HHE", "errphase_HV_SDH_HHN", "errphase_HV_SDH_HHZ", "errphase_HV_UWE_HHE", "errphase_HV_UWE_HHN", "errphase_HV_UWE_HHZ", "errphase_HV_UWB_HHE", "errphase_HV_UWB_HHN", "errphase_HV_UWB_HHZ", "errphase_HV_SBL_HHE", "errphase_HV_SBL_HHN", "errphase_HV_SBL_HHZ", "errphase_HV_KKO_HHE", "errphase_HV_KKO_HHN", "errphase_HV_KKO_HHZ", "errphase_HV_RIMD_HHE", "errphase_HV_RIMD_HHN", "errphase_HV_RIMD_HHZ", "mean_errphase", "mean_min50_errphase", "fm_start", "fm_A_above_LTA", "fm_STALTA", "fm_Afrac", "fm_HV_NPT_HHE", "fm_HV_NPT_HHN", "fm_HV_NPT_HHZ", "fm_HV_OBL_HHE", "fm_HV_OBL_HHN", "fm_HV_OBL_HHZ", "fm_HV_WRM_HHE", "fm_HV_WRM_HHN", "fm_HV_WRM_HHZ", "fm_HV_SDH_HHE", "fm_HV_SDH_HHN", "fm_HV_SDH_HHZ", "fm_HV_UWE_HHE", "fm_HV_UWE_HHN", "fm_HV_UWE_HHZ", "fm_HV_UWB_HHE", "fm_HV_UWB_HHN", "fm_HV_UWB_HHZ", "fm_HV_SBL_HHE", "fm_HV_SBL_HHN", "fm_HV_SBL_HHZ", "fm_HV_KKO_HHE", "fm_HV_KKO_HHN", "fm_HV_KKO_HHZ", "fm_HV_RIMD_HHE", "fm_HV_RIMD_HHN", "fm_HV_RIMD_HHZ"];
opts.VariableTypes = ["double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double"];

% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";

% Specify variable properties
opts = setvaropts(opts, "start", "InputFormat", "dd-MMM-yyyy HH:mm:ss");
opts = setvaropts(opts, "windowstartTime", "InputFormat", "dd-MMM-yyyy HH:mm:ss");
opts = setvaropts(opts, "fm_start", "InputFormat", "dd-MMM-yyyy HH:mm:ss");

% Import the data
total = readtable(filename, opts);

end